<template>
  <div v-if="Object.keys(goods).length !== 0" class="base-info">
    <div class="info-title">{{ goods.title }}</div>
    <div class="info-price">
      <span class="new-price">{{ goods.newPrice }}</span>
      <span class="old-price">{{ goods.oldPrice }}</span>
      <span class="discount" v-if="goods.discount">{{ goods.discount }}</span>
    </div>
    <div class="info-other">
      <span>{{ goods.columns[0] }}</span>
      <span>{{ goods.columns[1] }}</span>
      <span>{{ goods.columns[2] }}</span>

      <!-- <span>{{ goodsService }}</span> -->
    </div>
  </div>
</template>

<script scoped>
export default {
  props: {
    goods: Object,
    default() {
      return {};
    },
  },
  computed: {
    // goodsService() {
    //   if (this.goods.services[2]) {
    //     return this.goods.services[2];
    //   } else {
    //     return null;
    //   }
    // },
  },
};
</script>

<style>
.base-info {
  padding: 15px 5px 3px;
}
.info-price {
  margin-top: 15px;
}

.info-price .new-price {
  color: var(--color-tint);
  font-size: 16px;
}
.info-price .old-price {
  color: var(--color-text);
  font-size: 12px;
  text-decoration: 1px solid underline;
}
.info-other {
  display: flex;
  margin-top: 30px;
  font-size: 13px;
  text-align: center;
  justify-content: space-between;
}
.info-other span {
  flex: 1;
}
</style>